#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
@__author:gaoxiaojun
'''
from selenium.webdriver.common.by import By
from func.findEeleFun import getBrowserDriver
from selenium import webdriver
from Page.basePage import BasePage

class Baidu(BasePage):
    # 定位器
    input_loc = (By.ID, "kw")
    button_loc = (By.ID, "su")

    input=['id','kw']
    button=['id','su']

    def test_search(self,searchKey):

        self.find_element_mothod(*self.input_loc).send_keys(searchKey)

    def testqq(self,searchKey):

        self.send(self.input,searchKey)

    def click_submit(self):
        self.click(self.button)
        print('ok =============')
    def tearDown(self):
        self.driver.quit()


if __name__ == '__main__':
    url = "https://www.baidu.com/"
    driver = getBrowserDriver("Chrome")
    # driver = getBrowserDriver("Firefox")
    Baidu(driver,url,'百度一下').testqq('新白娘子传奇')



